package org.jupiter.blog.web.controller;

import org.jupiter.blog.api.dto.JupiterArticleDTO;
import org.jupiter.blog.api.http.JupiterResult;
import org.jupiter.blog.common.utils.RSAKeyGeneratorUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("/common")
public class CommonController {

	// 提供公钥给前端
	@GetMapping("/public-key")
	public JupiterResult<String> getPublicKey() {
		return JupiterResult.success(RSAKeyGeneratorUtil.getPublicKey());
	}
}
